import request from '@/utils/request'

// 获取订单详情
export function getOrder(id) {
  return request({
    url: '/merchant/order/' + id,
    method: 'get'
  })
}

// 创建订单
export function createOrder(data) {
  return request({
    url: '/merchant/order',
    method: 'post',
    data: data
  })
}

// 支付订单
export function payOrder(orderId, payType) {
  return request({
    url: `/merchant/order/pay/${orderId}`,
    method: 'post',
    params: { payType }
  })
}

// 获取订单列表
export function listOrder(query) {
  return request({
    url: '/merchant/order/list',
    method: 'get',
    params: query
  })
} 